import request from "@/utils/request";
export const get = function (uri, data, config) {
  return request({
    method: "get",
    url: "/dashboard/" + uri,
    params: data,
    ...config,
  });
};

export const post = function (uri, data, config) {
  return request({
    method: "post",
    url: "/dashboard/" + uri,
    data,
    ...config,
  });
};

export const put = function (uri, data, config) {
  return request({
    method: "put",
    url: "/dashboard/" + uri,
    data,
    ...config,
  });
};

export const remove = function (uri, data, config) {
  return request({
    method: "delete",
    url: "/dashboard/" + uri,
    params: data,
    ...config,
  });
};

export function departmentCount() {
  return get("departmentCount");
}

export function deviceCount() {
  return get("deviceCount");
}

export function userCount() {
  return get("userCount");
}

export default {
  departmentCount,
  deviceCount,
  userCount,
};
